body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    overflow: auto; /* Allow scrolling if board expands significantly */
    flex-direction: column; /* Arrange content vertically */
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Space between donators and game */
    padding: 20px;
    box-sizing: border-box;
}

.game-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90vw; /* Prevent it from being too wide */
    max-height: 90vh; /* Prevent it from being too tall */
    overflow: auto; /* Add scrollbars if content exceeds max dimensions */
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

#game-status {
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #555;
}

#game-board {
    display: grid;
    /* Grid template columns/rows will be set dynamically by JS */
    border: 2px solid #333;
    border-radius: 5px;
    margin-bottom: 20px;
    background-color: #eee;
    overflow: visible; /* Let cells overflow if needed during expansion */
    flex-shrink: 0; /* Prevent board from shrinking */
    min-width: calc(3 * 60px + 2 * 2px); /* Minimum size for initial 3x3 */
    min-height: calc(3 * 60px + 2 * 2px);
}

.cell {
    width: 60px; /* Base size */
    height: 60px; /* Base size */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ccc;
    box-sizing: border-box; /* Include padding/border in cell dimensions */
    transition: background-color 0.2s ease;
}

.cell:hover {
    background-color: #e0e0e0;
}

.cell.X {
    color: #e74c3c; /* Red */
}

.cell.O {
    color: #3498db; /* Blue */
}

#reset-button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#reset-button:hover {
    background-color: #218838;
}

/* Styles for Top Donators Section */
#top-donators-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    width: 100%;
    max-width: 600px; /* Limit width to align with game container if needed */
}

#top-donators-container h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

#donators-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.donator-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out username and amount */
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.donator-item:last-child {
    border-bottom: none;
}

.donator-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.donator-info {
    display: flex;
    align-items: center;
}

.donator-username {
    font-weight: bold;
    color: #444;
}

.donator-credits {
    font-weight: bold;
    color: #28a745; /* Green for credits */
    margin-left: 10px;
}